//
//  UIButton+Extension.swift
//  CXSwiftWB
//
//  Created by CaoXuan on 2017/5/14.
//  Copyright © 2017年 meidaer. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(imageName: String, backImageName: String) {
        self.init()
        setImage(UIImage(named: "tabbar_compose_icon_add"), for: UIControlState.normal)
        setImage(UIImage(named: "tabbar_compose_icon_add_highlighted"), for: UIControlState.highlighted)
        
        // 3.设置背景图片
        setBackgroundImage(UIImage(named: "tabbar_compose_button"), for: UIControlState.normal)
        setBackgroundImage(UIImage(named: "tabbar_compose_button_highlighted"), for: UIControlState.highlighted)
        
        // 调整按钮尺寸
        sizeToFit()

    }
}
